package com.hsc.www.exchangeType.direct1;

import com.hsc.www.User;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class UserReceiver {

    @RabbitListener(queues= Config.QUEUE_NAME)    //监听器监听指定的Queue
    public void receive(User user) {
        System.out.println("接收："+ user.toString());
    }

}
